#include <fstream>
#include <string>
#include <stdio.h>
#include <iostream>
#include <complex>
#include <cmath>

#include "TFile.h"
#include "TTree.h"
#include "TBranch.h"
#include "TH1D.h"
#include "TH2D.h"
#include "TGraph.h"
#include "TGraph2D.h"
#include "TF1.h"
#include "TF2.h"
#include "TMath.h"
#include "TStyle.h"
#include "TCanvas.h"

#include "ToDetection.h"

using namespace std;

const string RawNo = "9557";

const int Rdim = 768;
const int Tdim = 1024;
const int TrkNo = 4;			// tracker No.
const int XYdim = 2;			// X/Y 
const double factor = 1;
const double rm = 200/factor;             // curvature of the spherical mirror, unit: cm
const double HitCut = 2.0;      // unit: cm

//parameters to solve the quartic function
const double PI = 3.1415926535897932384626;
const double M_2PI = 2*PI;
const double eps = 1e-12;

const double Xdir = -0.0;   //
const double Ydir = -0.0;   //
const double Zdir = 1;
const double Xinj = 0./factor;    // if factor = 1, unit: cm  //
const double Yinj = 0./factor;    //
const double Zinj = 0/factor;

int main(int argc, char* argv[])
{
    string Path = (string) argv[1];

    ToDetection TD("9557");

    return 0;
}